package com.yao.grpcdemo.grpc;

import io.grpc.ServerBuilder;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;

/**
 * GRpc配置类
 *
 * @author yys1892
 */
public class GRpcConfiguration {
    @Bean
    @ConditionalOnClass(ServerBuilder.class)
    public GRpcServiceBeanPostProcessor gRpcServiceBeanPostProcessor() {
        return new GRpcServiceBeanPostProcessor();
    }


    @Bean
    @ConditionalOnClass(ServerBuilder.class)
    public GRpcApplicationEventListener gRpcApplicationEventListener() {
        return new GRpcApplicationEventListener();
    }

}
